package com.ming.dubbo.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ming.dubbo.bean.UserAddress;
import com.ming.dubbo.service.UserService;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Service(interfaceClass = UserService.class,version = "1.0-SNAPSHOT",timeout = 15000)
@Component
public class UserServiceImpl implements UserService {

    @Override
    public List<UserAddress> getUserAddressList(String userId) {
        // 调用dao接口,这里简单写在方法内
        UserAddress userAddress = new UserAddress();
        userAddress.setUserId(userId);
        userAddress.setPhoneNum("188");
        List<UserAddress> list = new ArrayList<>();
        list.add(userAddress);
        return list;
    }
}
